import json


def save_password_table(filename, password_table):
    with open(filename, 'w') as file:
        json.dump(password_table, file)


def load_password_table(filename):
    with open(filename, 'r') as file:
        return json.load(file)


# 示例使用
password_table = {
    '100': {
        'A': ['12345', '23451'],
        'B': ['54321', '43210'],
        'C': ['55555', '44444'],
        'reset': '00000'
    }
}
save_password_table('password_table.json', password_table)
loaded_table = load_password_table('password_table.json')
print(loaded_table)
